import java.util.Arrays;
import java.util.Scanner;

public class HelloGit {
    public static void main(String[] args) {
        System.out.println("HelloGit:请输入数组");
        Scanner input = new Scanner(System.in);
        int arrayLen = 10;
        int maxSum = 0;
        int cnt=0;
        boolean isPrime;
        int[] A = new int[arrayLen];
        for (int i = 0; i < A.length; i++) {
            A[i] = input.nextInt();
        }
        for (int i = 0; i < A.length; i++) {
            int sum = 0;
            for (int j = i; j < A.length; j++) {
                sum = sum + A[j];
                if (sum > maxSum) {
                    maxSum = sum;
                }
            }
        }
        System.out.println("子数组之和的最大值为："+maxSum);
        //实验3素数
        for(int k=3;k<=20000;k+=2){
            isPrime=true;
                for( int i =3; i< Math.sqrt(k); i+=2)
                {
                    if( k % i == 0) {
                        isPrime = false;
                        break;
                    }
                    else {
                        cnt++;
                    }
                }
            if(isPrime){
                System.out.print(k+" ");
                if(cnt%5==0){
                    System.out.print("\n");
            }

               }
            }
            
        }
    }


